#include <iostream>
#include <istream>
#include <ostream>
class Foo {
public:
  Foo(int a = 0, double b = 0.0, char c = '\0') : _a(a), _b(b), _c(c) {}

  int a() const { return _a; }
  void setA(int a) { _a = a; }

  double b() const { return _b; }
  void setB(double b) { _b = b; }

  char c() const { return _c; }
  void setC(char c) { _c = c; }

private:
  int _a;
  double _b;
  char _c;
};

std::ostream &operator<<(std::ostream &os, const Foo &foo) {
  os << foo.a() << " " << foo.b() << " " << foo.c();
  return os;
}

std::istream &operator>>(std::istream &is, Foo &foo) {
  int a;
  double b;
  char c;
  is >> a >> b >> c;
  foo = Foo{a, b, c};
  return is;
}

int main() {
  std::cout << sizeof(Foo) << std::endl;
  Foo foo{42, 3.14, 'c'};
  std::cout << foo << std::endl;
  std::cin >> foo;
  std::cout << foo;
}